﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MasterPage.master" AutoEventWireup="true"
    CodeFile="GuestBook_Set.aspx.cs" Inherits="Manage_GuestBook_Set" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        #main_table
        {
            width: 99%;
            border-collapse: collapse;
            empty-cells: show;
            margin-left: 8px;
            margin-top: 10px;
            margin-bottom: 20px;
        }
        #main_table tr
        {
            height: 35px;
            background: #f6f6f6;
        }
        #main_table tr td
        {
            border: #d8d8d8 1px solid;
            vertical-align: middle;
        }
        #main_table tr .td1
        {
            width: 110px;
            text-align: right;
            padding-right: 15px;
        }
        #main_table tr .td2
        {
            padding-left: 10px;
        }
        .tinput
        {
            width: 250px;
        }
        textarea
        {
            height: 170px;
            width: 450px;
        }
    </style>
    <script type="text/javascript">
        function isInteger(s) {
            var pattern = /^([-]){0,1}([0-9]){1,}([.]){0,1}([0-9]){0,}$/;
            if (!pattern.test(s))
                return false;
            return true;
        }
        var Pagesize_Integer = function () {//验证每页留言数
            var txtintval = $.trim(jQuery("[id$=pagesize_tb]").val());
            if (!isInteger(txtintval)) {
                alert("你输入每页留言数的值不是一个数字");
                return false;
            }
            else {
                return true;
            }
        }
        var Timespace_Integer = function () {//验证留言间隔
            var txtintval = $.trim(jQuery("[id$=timespace_tb]").val());
            if (!isInteger(txtintval)) {
                alert("你输入留言间隔的值不是一个数字");
                return false;
            }
            else {
                return true;
            }
        }
        var check_submit = function () {
            var boolsubmit;
            boolsubmit = Pagesize_Integer() && Timespace_Integer();
            return boolsubmit;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table id="main_table">
        <tr style="height: 25px; background: url('images/tt_x.gif') repeat-x;">
            <td colspan="2" style="padding-left: 8px;">
                留言板设置
            </td>
        </tr>
        <tr>
            <td class="td1">
                每页留言数:
            </td>
            <td class="td2">
                <asp:TextBox ID="pagesize_tb" runat="server" CssClass="tinput"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="td1">
                留言间隔:
            </td>
            <td class="td2">
                <asp:TextBox ID="timespace_tb" runat="server" CssClass="tinput"></asp:TextBox>秒
            </td>
        </tr>
        <tr>
            <td class="td1">
                需要验证:
            </td>
            <td class="td2">
                <asp:CheckBox ID="shenhe" runat="server"  Text="验证" style=" margin-left:30px;"/>
            </td>
        </tr>
        <tr>
            <td class="td1">
                限制IP地址:
            </td>
            <td class="td2">
                <asp:TextBox ID="limitIP_tb" runat="server" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: right; padding-right: 20px;">
                <asp:Button ID="Submit" runat="server" Text="确认修改" OnClientClick="return check_submit();" OnClick="Submit_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
